package com.bw.permission.controller;


import com.bw.permission.config.AjaxResult;
import com.bw.permission.utils.WebUtils;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.UUID;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zhanggm
 * @since 2020-10-28
 */
@RestController
@RequestMapping("/area")
public class AreaController {

    @RequestMapping("test")
    public AjaxResult test(HttpServletRequest request) {
        String token = WebUtils.getRequest().getHeader("token");
        System.out.println(token);

        System.out.println(token);
        String newToken = UUID.randomUUID() + "";

        return AjaxResult.ok(newToken);
    }

}
